home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_qt.idb / usr / freeware / include / Qt / qtabdialog.h.z / qtabdialog.h
Encoding:
C/C++ Source or Header  |  1998-10-28  |  2.4 KB  |  100 lines

  1. /****************************************************************************
  2. ** $Id: qtabdialog.h,v 2.20 1998/07/03 00:09:29 hanord Exp $
  3. **
  4. ** Definition of QTabDialog class
  5. **
  6. ** Created : 960825
  7. **
  8. ** Copyright (C) 1992-1998 Troll Tech AS.  All rights reserved.
  9. **
  10. ** This file is part of Qt Free Edition, version 1.40.
  11. **
  12. ** See the file LICENSE included in the distribution for the usage
  13. ** and distribution terms, or http://www.troll.no/free-license.html.
  14. **
  15. ** IMPORTANT NOTE: You may NOT copy this file or any part of it into
  16. ** your own programs or libraries.
  17. **
  18. ** Please see http://www.troll.no/pricing.html for information about 
  19. ** Qt Professional Edition, which is this same library but with a
  20. ** license which allows creation of commercial/proprietary software.
  21. **
  22. *****************************************************************************/
  23.  
  24. #ifndef QTABDIALOG_H
  25. #define QTABDIALOG_H
  26.  
  27. #ifndef QT_H
  28. #include "qdialog.h"
  29. #endif // QT_H
  30.  
  31.  
  32. class  QTabBar;
  33. struct QTabPrivate;
  34. struct QTab;
  35.  
  36.  
  37. class QTabDialog : public QDialog
  38. {
  39.     Q_OBJECT
  40. public:
  41.     QTabDialog( QWidget *parent=0, const char *name=0, bool modal=FALSE,
  42.         WFlags f=0 );
  43.    ~QTabDialog();
  44.  
  45.     void show();
  46.     void setFont( const QFont & font );
  47.  
  48.     void addTab( QWidget *, const char * );
  49.     void addTab( QWidget *, QTab* );
  50.     bool isTabEnabled( const char * ) const;
  51.     void setTabEnabled( const char *, bool );
  52.  
  53.     void showPage( QWidget * );
  54.     const char * tabLabel( QWidget * );
  55.  
  56.     void setDefaultButton( const char *text = "Defaults" );
  57.     bool hasDefaultButton() const;
  58.  
  59.     void setCancelButton( const char *text = "Cancel" );
  60.     bool hasCancelButton() const;
  61.  
  62.     void setApplyButton( const char *text = "Apply" );
  63.     bool hasApplyButton() const;
  64.  
  65. #if 1 // OBSOLETE
  66.     void setOKButton( const char * text = "OK" );
  67. #endif
  68.     void setOkButton( const char * text = "OK" );
  69.     bool hasOkButton() const;
  70.  
  71. protected:
  72.     void paintEvent( QPaintEvent * );
  73.     void resizeEvent( QResizeEvent * );
  74.     void styleChange( GUIStyle );
  75.     void setTabBar( QTabBar* );
  76.     QTabBar* tabBar() const;
  77.  
  78. signals:
  79.     void aboutToShow();
  80.  
  81.     void applyButtonPressed();
  82.     void cancelButtonPressed();
  83.     void defaultButtonPressed();
  84.  
  85.     void selected( const char * );
  86.  
  87. private slots:
  88.     void showTab( int i );
  89.  
  90. private:
  91.     void setSizes();
  92.     void setUpLayout();
  93.     QRect childRect() const;
  94.  
  95.     QTabPrivate *d;
  96. };
  97.  
  98.  
  99. #endif // QTABDIALOG_H
  100.